﻿@page
@model BoYuanCore.WebForm.Pages.Admin.SysRole.IndexModel
@{
    ViewBag.Title = "";
    var F = Html.F();
}


@section body {
    <f:Panel ID="Panel1" runat="server" BodyPadding="3px" ShowBorder="false" ShowHeader="false" Title="Panel" Layout="Fit">
        <Items>
            <f:Grid ID="Grid1" runat="server" Title="Grid" AllowPaging="true" AllowSorting="true" SortDirection="asc" SortField="id"
                    EnableCheckBoxSelect="true" EnableTextSelection="true" CheckBoxSelectOnly="true"
                    IsDatabasePaging="true" ShowHeader="false">
                <Toolbars>
                    <f:Toolbar runat="server">
                        <Items>
                            <f:Button ID="Button_add" runat="server" Icon="Add" Text="新增" EnablePostBack="false" />

                            <f:ToolbarSeparator runat="server" />

                            <f:Button ID="Button_delete" runat="server" Icon="Delete"
                                      ConfirmText="确定要执行选中行操作吗？" Text="批量删除" OnClick="Button_delete_OnClick" />
                            <f:ToolbarSeparator runat="server" />
                            <f:CheckBox ID="cb_del" runat="server" Label="只显示删除数据" DisplayType="Switch" ShowSwitchText="true"
                                        OnCheckedChanged="cb_del_OnCheckedChanged" AutoPostBack="true" EnableAjax="true" LabelWidth="120" />
                            <f:ToolbarFill runat="server" />
                        </Items>
                    </f:Toolbar>
                </Toolbars>
                <Columns>
                    <f:RenderField HeaderText="ID" DataField="GridID" Width="50" />
                    
                    <f:RenderField HeaderText="修改" DataField="ID" RendererFunction="renderUpdateRole" ExpandUnusedSpace="true" MinWidth="80" />
                    <f:RenderField HeaderText="权限角色名称" DataField="RoleName" ExpandUnusedSpace="true" />

                </Columns>
                <PageItems>
                    <f:ToolbarSeparator runat="server" />
                    <f:ToolbarText runat="server" Text="每页记录数：" />

                    <f:DropDownList runat="server" ID="ddlPageSize" Width="80" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_OnSelectedIndexChanged">
                        <f:ListItem Text="5" Value="5" />
                        <f:ListItem Text="10" Value="10" />
                        <f:ListItem Text="15" Selected="true" Value="15" />
                        <f:ListItem Text="20" Value="20" />
                    </f:DropDownList>
                </PageItems>
            </f:Grid>
        </Items>
    </f:Panel>
    <f:Window ID="Window1" runat="server" Height="600" Width="800" IsModal="true" EnableMaximize="true"
              CloseAction="HidePostBack" EnableIFrame="true" Hidden="true" Icon="ApplicationFormEdit" OnClose="Window1_OnClose"
              Target="Top" EnableResize="true">
    </f:Window>

}
<script>
    function renderUpdateRole(value, params) {
        var encodedValue = F.htmlEncode(value);
        return $('<a>', {
            'target': '_blank',
            'href': 'http://gsa.ustc.edu.cn/search?q=' + F.urlEncode(value),
            'data-qtip': encodedValue,
            'html': encodedValue
        });
    }
</script>